{{include file="default/Public/header.html"}}
<script src="{{$smarty.const._PUBLIC_}}js/editable/jquery.editable.js" type="text/javascript"></script>
<script type="text/javascript">
$().ready(function () {
		//排序
	$(".editable_sort").editable("{{U url='fmodule/edit?ajax=sort'}}",{
			indicator : '<img src="__ROOT__/admin/Public/images/loading2.gif" />',
      tooltip   : "点击可快速编辑排序",
			name			: 'sort',
			id				: 'moduleid',
			placeholder : '不可用',
			select	  : true,
			event	  : "click",
			onblur : "submit"
	});
});
</script>
<div id="pageTop">
	<div class="tabs"> 
		<ul>
			<li><a href='{{U url="fmodule/add"}}' {{if $action_name=="add"}}class="selected"{{/if}}>注册模块</a></li>
			<li><a href='{{U url="fmodule/manage"}}' {{if $action_name=="manage"}}class="selected" rel="tabsContent1"{{/if}}>管理模块</a></li>
		</ul>		
	</div>
</div>
<form method="post" action="{{U url='fpage/manage?dosubmit=1'}}">
<div id="pageCo">
	<div class="listForm">
		<table cellpadding="0" cellspacing="0">
			<thead>
				<tr>
					<th width="30">排序</th>
				    <th width="80">模块名称</th>
				    <th>描述</th>
				    <th width="50">主记录表</th>
				    <th width="50">可扩展</th>
				    <th width="65">模块类型</th>
				    <th width="50">控制器</th>
				    <th width="150">操作</th>
				</tr>
			</thead>
			<tbody> 
				{{foreach from=$data.info item=v}}
				  <tr>
				    <td class="editable_sort pointer" id="moduleid_{{$v.moduleid}}">{{$v.sort}}</td>
				    <td>{{$v.name}}</td>
				    <td>{{$v.description}}</td>
				    <td>{{$v.tablename}}</td>  
				    <td>{{if $v.extendable>0}}是{{else}}否{{/if}}</td>  
				    <td>{{if $v.ishtml>0}}静态{{else}}动态{{/if}}</td>
				    <td>{{$v.controller}}</td> 
				    <td>
				    <a href='{{U url="fmodule/edit?_tablename=module&moduleid=`$v.moduleid`"}}'>修改</a> | 
				    {{if $v.status == '1'}}
				    <a href='{{U url="fmodule/edit?_tablename=module&do=status&moduleid=`$v.moduleid`&status=0"}}'>禁用</a> | 
				    {{else}}
				    <a href='{{U url="fmodule/edit?_tablename=module&do=status&moduleid=`$v.moduleid`&status=1"}}' style="color:red;">启用</a> | 
				    {{/if}}
				    <a href='{{U url="fmodule/delete?moduleid=`$v.moduleid`"}}' onclick="return window.confirm('此操作不可恢复，你确定要删除该模块在系统的注册信息？');">卸载</a></td>
				  </tr>
				  {{foreachelse}}
				  <tr><td colspan="8">暂无记录！</td></tr>
				  {{/foreach}}
			</tbody>
		</table>
	</div>
	<div class="pageList">
		{{$data.pages}}
		<ul class="clearit"></ul> 
	</div>
</div>
</form>
{{include file="default/Public/footer.html"}}